#-*-coding:utf-8-*-
'''
Created on 2011-1-11

@author: zhaoyh
'''
import sys,web
from  function import register_module
reload(sys)
sys.setdefaultencoding('utf8')#设置默认编码
web.config.debug = True
urls=()
modules=[]#模块
urls,modules=register_module('portal','PF')
app = web.application(urls, globals())
#session = web.session.Session(app, web.session.DiskStore('sessions'), initializer={'count': 0})
#调试模式下使用session
if web.config.get('_session') is None:
    session = web.session.Session(app, web.session.DiskStore('sessions'), {'count': 0})
    web.config._session = session
else:
    session = web.config._session
if __name__ == "__main__":
    app.run()
